package domain

import (
	"vrcm/src/vrcm/common/models"
)

type RefreshConfig struct {
	models.Model

	TenantId      string `json:"tenant_id" gorm:"type:varchar(50);comment:租户"`
	DomainId      int    `json:"domain_id" gorm:"type:bigint unsigned;comment:域名配置id"`
	OperateType   int    `json:"operate_type" gorm:"type:tinyint;comment:操作类型 1 刷新 2预热"`
	OperateModel  int    `json:"operate_model" gorm:"type:tinyint;comment:操作方式 1 文件 2目录"`
	Url           string `json:"url" gorm:"type:varchar(500);comment:Url"`
	TaskId        string `json:"task_id" gorm:"type:varchar(500);comment:taskId"`
	RefreshTaskId string `json:"refresh_task_id" gorm:"type:varchar(500);comment:refresh_task_id"`
	RefreshState  int    `json:"refresh_state" gorm:"type:tinyint;comment:刷新状态 1 处理中，2 完成，3 失败，4 等待，5 刷新中，6 预热中"`
	models.ModelTime
	models.ControlBy
}

func (RefreshConfig) TableName() string {
	return "refresh_config"
}

func (e *RefreshConfig) Generate() models.ActiveRecord {
	o := *e
	return &o
}

func (e *RefreshConfig) GetId() interface{} {
	return e.Id
}
